// 数据表模型

import mongoose  from "mongoose";

// 1. 定义结构 Schema
const schema = new mongoose.Schema({
    username:{
        type: String,
        unique: true,
        require: true
    },
    password:{
        type:String,
    },
    nickname:String,
    avatar:String,
},{
    timestamps: true
})
// 2.定义模型Model
export const UserModel = mongoose.model('user',schema)